home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / crsbas.zip / CROSSBAS.DOC < prev    next >
Text File  |  1990-12-01  |  44KB  |  1,085 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.                                    CrossBas Manual
  23.  
  24.                        Power-BASIC Cross-Reference List Creator
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.                                   November 13, 1989 (1990)
  33.                                   (c) Lester L. Noll
  34.                               CompuServe Id:  72250,2551
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.                                      CrossBas.exe
  44.                                     version 1.00P
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.                                     ContentsContents
  58.  
  59.  
  60.                   1  Disclaimer  . . . . . . . . . . . . . . . . . . 1
  61.                   2  Copyright and Usage . . . . . . . . . . . . . . 1
  62.                   3  Introduction  . . . . . . . . . . . . . . . . . 1
  63.                   4  Running CrossBas  . . . . . . . . . . . . . . . 2
  64.                   5  Command Line Options  . . . . . . . . . . . . . 2
  65.                   6  Changing Defaults File  . . . . . . . . . . . . 5
  66.                   7  The Summary Report  . . . . . . . . . . . . . . 6
  67.                   8  What CrossBas Does  . . . . . . . . . . . . . . 8
  68.                      8.1  Initialize . . . . . . . . . . . . . . . . 8
  69.                      8.2  InitScreen . . . . . . . . . . . . . . . . 8
  70.                      8.3  ReadCmdLine  . . . . . . . . . . . . . . . 9
  71.                      8.4  OpenFiles  . . . . . . . . . . . . . . . . 9
  72.                      8.5  CalcFileNames  . . . . . . . . . . . . . . 9
  73.                      8.6  ReadDefaults . . . . . . . . . . . . . . . 9
  74.                      8.7  CheckStringSpace . . . . . . . . . . . .  10
  75.                      8.8  CalcWordArraySize  . . . . . . . . . . .  10
  76.                      8.9  PrintScreenTop . . . . . . . . . . . . .  10
  77.                      8.10  ReadAndParseData  . . . . . . . . . . .  10
  78.                      8.11  PrintScreen1  . . . . . . . . . . . . .  10
  79.                      8.12  Compare . . . . . . . . . . . . . . . .  11
  80.                      8.13  PrintScreen2  . . . . . . . . . . . . .  11
  81.                      8.14  Sort  . . . . . . . . . . . . . . . . .  11
  82.                      8.15  PrintScreen3  . . . . . . . . . . . . .  11
  83.                      8.16  PrintList . . . . . . . . . . . . . . .  11
  84.                      8.17  PrintReportBtm  . . . . . . . . . . . .  12
  85.                      8.18  PrintScreen4  . . . . . . . . . . . . .  12
  86.                      8.19  End Routines  . . . . . . . . . . . . .  12
  87.  
  88.                Appendix A  CrossBas Files                           13
  89.  
  90.                Appendix B  Modification History                     15
  91.  
  92.                Appendix C  Power-BASIC Reserved Words               17
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.                                           i
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.                                          ii
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.                                     FiguresFigures
  186.  
  187.  
  188.                Figure 1: Summary Report Example  . . . . . . . . . . 8
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.                                          iii
  237.  
  238.  
  239.           CROSSBAS.DOC                CrossBas Manual                page 1
  240.  
  241.  
  242.  
  243.           1  Disclaimer          1  Disclaimer
  244.  
  245.  
  246.                Hear ye, hear ye!  Be it known that the author hereby
  247.           disclaims all warranties expressed or implied as to the quality
  248.           or performance of this program.  The author will not be held
  249.           liable for any lost profits, lost savings or any other direct,
  250.           indirect, incidental or consequential damages resulting from the
  251.           use of this program.  Your use of this program constitutes your
  252.           agreement to this disclaimer and your release of the author from
  253.           any form of liability or litigation.  (Really gives you
  254.           confidence, huh?)
  255.  
  256.  
  257.           2  Copyright and Usage          2  Copyright and Usage
  258.  
  259.  
  260.                This program, as well as its accompanying files and
  261.           documents, is copyright by the author, Lester L. Noll.  You are
  262.           free to use and distribute it as you wish as long as you charge
  263.           no payment, either money or otherwise, for it.  Also, you must
  264.           keep all the associated files together.  The files are listed in
  265.           Appendix I.  Use PKUNZIP to unarchive.
  266.  
  267.                If you have any questions, comments or suggestions about
  268.           this program, feel free to contact me at CompuServe:
  269.  
  270.                     Lester L. Noll
  271.                     [72250,2551]
  272.  
  273.  
  274.           3  Introduction          3  Introduction
  275.  
  276.  
  277.                CrossBas will scan a Power-BASIC source file and create a
  278.           cross-reference table of variable names, labels, procedure and
  279.           function names versus the physical line numbers where those names
  280.           occur.
  281.  
  282.                To do this we must first read in all words in the file.  We
  283.           can skip text to the right of "REM" statements or "'" remark
  284.           identifiers; text to the right of "DATA" statements; text between
  285.           quote marks;  numbers;  and operators.
  286.  
  287.                After the program words are read in, we compare them with
  288.           Power-BASIC reserved words and metastatements.  We keep only
  289.           those that are not Power-BASIC words.
  290.  
  291.                Finally, we alphabetize the remaining words and print them
  292.           out, one word to a line, followed by the physical source file
  293.           line number(s) where these words are found.  The list is sorted
  294.           without regard to case.
  295.  
  296.  
  297.           CROSSBAS.DOC                CrossBas Manual                page 2
  298.  
  299.  
  300.  
  301.                We print the list to an ASCII file and allow the user some
  302.           control over its format.  You may either print it to your printer
  303.           using the DOS PRINT or TYPE filename.ext>PRN commands or you may
  304.           use a print program such as Norton's LP.
  305.  
  306.                At the end of the file is a summary report showing
  307.           processing times, number of words processed and a few
  308.           calculations that may be helpful for customizing CrossBas to your
  309.           own programming characteristics.
  310.  
  311.  
  312.           4  Running CrossBas          4  Running CrossBas
  313.  
  314.  
  315.                Run CrossBas from the DOS command line.  There is no
  316.           interactive mode.  If you enter "CROSSBAS" with no command line
  317.           parameters, CrossBas will print a short message showing proper
  318.           syntax and the optional switches.
  319.  
  320.  
  321.           5  Command Line Options          5  Command Line Options
  322.  
  323.  
  324.                The only required command line parameter is the input file
  325.           (source file) path/name.  The output file path/name and switches
  326.           are optional.  If no output file is entered, I append ".cb" to
  327.           the input file name to create an output file name.  If a file
  328.           having the same name as output file already exists, I write over
  329.           it -- so be warned.
  330.  
  331.                Command line options can be entered in any order.  In fact,
  332.           the only rule is that the input file path/name must be entered
  333.           before the output file path/name.  You may enter switches, one
  334.           after the other, without separating spaces.  If, however, you
  335.           enter a switch before a file path/name you must leave at least
  336.           one space between the file path/name and the preceding switch.
  337.  
  338.           Syntax:
  339.  
  340.           crossbas infile[.ext][outfile][.ext][/bw][/p][/u][/s][/l:n][/w:n]
  341.  
  342.  
  343.           Switches:
  344.                /bw  Set screen colors to black and white.
  345.                /p   Paginate output file and print page headers.
  346.                /u   Print variables to output file in upper case.
  347.                /s   Print the list to the screen as well as to file.
  348.                /l:n Set the printer left margin to n columns.
  349.                /w:n Override CrossBas' word array dimension calculation.
  350.  
  351.  
  352.